﻿using System;
using System.Xml;
using System.ComponentModel;
using System.Text;
using System.Collections.ObjectModel;

namespace AMail.Common.Interfaces.Data
{
  public interface IMailMessage : INotifyPropertyChanged, INotifyPropertyChanging, IActionableObject
  {
    DateTime Date { get; }
    string From { get; }
    string Id { get; }
    //Mime Mime { get; }
    int Size { get; }
    byte[] Source { get; }
    string To { get; }

    bool IsNew { get; }
    bool IsLoaded { get; }

    IMailFolder ParentFolder { get; set; }
    IMailFolder PreviousParentFolder { get; }
    string Subject { get; set; }
    Encoding Encoding { get; set; }

    void WriteXml(XmlTextWriter writer);

    IMailMessage Clone();

    ReadOnlyCollection<IMailAttachment> Attachments { get; }
  }

  public enum MessageState
  {
    NotLoaded,
    Loading,
    Loaded
  }
}
